/*
 * @Description  :
 * @Author       : Keyman
 * @Date         : 2025-11-24 19:47:06
 * @LastEditors  : Keyman
 * @LastEditTime : 2025-11-28 16:55:07
 */

import type React from "react";
import { post } from "../utils/http/request";
import type { DataType } from "../page/users/interface";

type searchType = {
  page: number;
  pageSize: number;
  companyName?: string;
  person?: string;
  tel?: string;
};
export function getUserList(data: searchType) {
  return post("/userlist", data);
}

// 删除用户
export function deleteUser(id: string | number) {
  return post("/deleteUser", { id });
}

// 批量删除用户
export function batchDeleteUser(ids: React.Key[]) {
  return post("/batchDeleteUser", { ids });
}

// 编辑用户
export function editUser(data: DataType) {
  return post("/editUser", data);
}
